package com.kscrm.web.service.impl;

import java.util.List;

import com.kscrm.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.kscrm.web.mapper.ChannelFollowUpMapper;
import com.kscrm.web.domain.ChannelFollowUp;
import com.kscrm.web.service.IChannelFollowUpService;

/**
 * 渠道跟进内容Service业务层处理
 * 
 * @author Dhq
 * @date 2025-04-23
 */
@Service
public class ChannelFollowUpServiceImpl implements IChannelFollowUpService 
{
    @Autowired
    private ChannelFollowUpMapper channelFollowUpMapper;

    /**
     * 查询渠道跟进内容
     * 
     * @param id 渠道跟进内容主键
     * @return 渠道跟进内容
     */
    @Override
    public ChannelFollowUp selectChannelFollowUpById(Long id)
    {
        return channelFollowUpMapper.selectChannelFollowUpById(id);
    }

    /**
     * 查询渠道跟进内容列表
     * 
     * @param channelFollowUp 渠道跟进内容
     * @return 渠道跟进内容
     */
    @Override
    public List<ChannelFollowUp> selectChannelFollowUpList(ChannelFollowUp channelFollowUp)
    {
        return channelFollowUpMapper.selectChannelFollowUpList(channelFollowUp);
    }

    /**
     * 新增渠道跟进内容
     * 
     * @param channelFollowUp 渠道跟进内容
     * @return 结果
     */
    @Override
    public int insertChannelFollowUp(ChannelFollowUp channelFollowUp)
    {
        channelFollowUp.setUserId(SecurityUtils.getUserId());
        return channelFollowUpMapper.insertChannelFollowUp(channelFollowUp);
    }

    /**
     * 修改渠道跟进内容
     * 
     * @param channelFollowUp 渠道跟进内容
     * @return 结果
     */
    @Override
    public int updateChannelFollowUp(ChannelFollowUp channelFollowUp)
    {
        return channelFollowUpMapper.updateChannelFollowUp(channelFollowUp);
    }

    /**
     * 批量删除渠道跟进内容
     * 
     * @param ids 需要删除的渠道跟进内容主键
     * @return 结果
     */
    @Override
    public int deleteChannelFollowUpByIds(Long[] ids)
    {
        return channelFollowUpMapper.deleteChannelFollowUpByIds(ids);
    }

    /**
     * 删除渠道跟进内容信息
     * 
     * @param id 渠道跟进内容主键
     * @return 结果
     */
    @Override
    public int deleteChannelFollowUpById(Long id)
    {
        return channelFollowUpMapper.deleteChannelFollowUpById(id);
    }
}
